.\" Copyright 2018, Joyent Inc.
.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
.\" Copyright (c) 2001, Sun Microsystems, Inc.,  All Rights Reserved.
.\" Copyright 1989 AT&T
.\" The contents of this file are subject to the terms of the
.\" Common Development and Distribution License (the "License").
.\" You may not use this file except in compliance with the License.
.\"
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
.\" or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions
.\" and limitations under the License.
.\"
.\" When distributing Covered Code, include this CDDL HEADER in each
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
.\" If applicable, add the following below this CDDL HEADER, with the
.\" fields enclosed by brackets "[]" replaced with your own identifying
.\" information: Portions Copyright [yyyy] [name of copyright owner]
.Dd July 9, 2018
.Dt INTRO 9S
.Os
.Sh NAME
.Nm Intro ,
.Nm intro
.Nd introduction to kernel data structures and properties
.Sh DESCRIPTION
Section 9P describes kernel properties used by device drivers.
Section 9S
describes the data structures used by drivers to share information between the
driver and the kernel.
See
.Xr Intro 9E
for an overview of device driver
interfaces.
.Pp
In Section 9S, reference pages contain the following headings:
.Bl -bullet -offset indent
.It
.Sy NAME
summarizes the purpose of the structure or property.
.It
.Sy SYNOPSIS
lists the include file that defines the structure or property.
.It
.Sy "INTERFACE LEVEL"
describes any architecture dependencies.
.It
.Sy DESCRIPTION
provides general information about the structure or property.
.It
.Sy "STRUCTURE MEMBERS"
lists all accessible structure members (for Section 9S).
.It
.Sy "SEE ALSO"
gives sources for further information.
.El
.Pp
Of the preceding headings, Section 9P reference pages contain the
.Sy NAME ,
.Sy DESCRIPTION ,
and
.Sy "SEE ALSO"
fields.
.Pp
Every driver MUST include
.In sys/ddi.h
and
.In sys/sunddi.h ,
in that order, and as final entries.
.Pp
The following table summarizes the STREAMS structures described in Section 9S.
.Bl -column "module_info" "illumos DDI" -offset indent
.It Structure Ta Type
.It Vt copyreq Ta DDI/DKI
.It Vt copyresp Ta DDI/DKI
.It Vt datab Ta DDI/DKI
.It Vt fmodsw Ta illumos DDI
.It Vt free_rtn Ta DDI/DKI
.It Vt iocblk Ta DDI/DKI
.It Vt linkblk Ta DDI/DKI
.It Vt module_info Ta DDI/DKI
.It Vt msgb Ta DDI/DKI
.It Vt qband Ta DDI/DKI
.It Vt qinit Ta DDI/DKI
.It Vt queclass Ta illumos DDI
.It Vt queue Ta DDI/DKI
.It Vt streamtab Ta DDI/DKI
.It Vt stroptions Ta DDI/DKI
.El
.Pp
The following table summarizes structures that are not specific to STREAMS I/O.
.Bl -column "ddi_device_acc_attr" "illumos x86 DDI" -offset indent
.It Structure	Type
.It Vt aio_req Ta illumos DDI
.It Vt buf Ta DDI/DKI
.It Vt cb_ops Ta illumos DDI
.It Vt ddi_device_acc_attr Ta illumos DDI
.It Vt ddi_dma_attr Ta illumos DDI
.It Vt ddi_dma_cookie Ta illumos DDI
.It Vt ddi_dmae_req Ta illumos x86 DDI
.It Vt ddi_idevice_cookie Ta illumos DDI
.It Vt ddi_mapdev_ctl Ta illumos DDI
.It Vt devmap_callback_ctl Ta illumos DDI
.It Vt dev_ops Ta illumos DDI
.It Vt iovec Ta DDI/DKI
.It Vt kstat Ta illumos DDI
.It Vt kstat_intr Ta illumos DDI
.It Vt kstat_io Ta illumos DDI
.It Vt kstat_named Ta illumos DDI
.It Vt map Ta DDI/DKI
.It Vt modldrv Ta illumos DDI
.It Vt modlinkage Ta illumos DDI
.It Vt modlstrmod Ta illumos DDI
.It Vt scsi_address Ta illumos DDI
.It Vt scsi_arq_status Ta illumos DDI
.It Vt scsi_device Ta illumos DDI
.It Vt scsi_extended_sense Ta illumos DDI
.It Vt scsi_hba_tran Ta illumos DDI
.It Vt scsi_inquiry Ta illumos DDI
.It Vt scsi_pkt Ta illumos DDI
.It Vt scsi_status Ta illumos DDI
.It Vt uio Ta DDI/DKI
.El
.Sh SEE ALSO
.Xr Intro 9E
.Sh NOTES
Do not declare arrays of structures as the size of the structures can change
between releases.
Rely only on the structure members listed in this chapter and
not on unlisted members or the position of a member in a structure.
